Optimal. Leaf size=63 \[ \frac {2 x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}{n}+\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}\right )}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {2004, 2032,
2054, 209} \begin {gather*} \frac {2 \sqrt {a} \text {ArcTan}\left (\frac {\sqrt {a}}{x \sqrt {b x^{n-2}-\frac {a}{x^2}}}\right )}{n}+\frac {2 x \sqrt {b x^{n-2}-\frac {a}{x^2}}}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 209
Rule 2004
Rule 2032
Rule 2054
Rubi steps
\begin {align*} \int \sqrt {\frac {-a+b x^n}{x^2}} \, dx &=\int \sqrt {-\frac {a}{x^2}+b x^{-2+n}} \, dx\\ &=\frac {2 x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}{n}-a \int \frac {1}{x^2 \sqrt {-\frac {a}{x^2}+b x^{-2+n}}} \, dx\\ &=\frac {2 x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}{n}+\frac {(2 a) \text {Subst}\left (\int \frac {1}{1+a x^2} \, dx,x,\frac {1}{x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}\right )}{n}\\ &=\frac {2 x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}{n}+\frac {2 \sqrt {a} \tan ^{-1}\left (\frac {\sqrt {a}}{x \sqrt {-\frac {a}{x^2}+b x^{-2+n}}}\right )}{n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 77, normalized size = 1.22 \begin {gather*} \frac {2 x \sqrt {\frac {-a+b x^n}{x^2}} \left (\sqrt {-a+b x^n}-\sqrt {a} \tan ^{-1}\left (\frac {\sqrt {-a+b x^n}}{\sqrt {a}}\right )\right )}{n \sqrt {-a+b x^n}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.74, size = 105, normalized size = 1.67
method | result | size |
risch | \(-\frac {2 \left (a -b \,{\mathrm e}^{n \ln \left (x \right )}\right ) \sqrt {\frac {b \,{\mathrm e}^{n \ln \left (x \right )}-a}{x^{2}}}\, x}{n \left (b \,{\mathrm e}^{n \ln \left (x \right )}-a \right )}-\frac {2 \sqrt {a}\, \arctan \left (\frac {\sqrt {b \,{\mathrm e}^{n \ln \left (x \right )}-a}}{\sqrt {a}}\right ) \sqrt {\frac {b \,{\mathrm e}^{n \ln \left (x \right )}-a}{x^{2}}}\, x}{n \sqrt {b \,{\mathrm e}^{n \ln \left (x \right )}-a}}\) | \(105\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.32, size = 118, normalized size = 1.87 \begin {gather*} \left [\frac {2 \, x \sqrt {\frac {b x^{n} - a}{x^{2}}} + \sqrt {-a} \log \left (\frac {b x^{n} - 2 \, \sqrt {-a} x \sqrt {\frac {b x^{n} - a}{x^{2}}} - 2 \, a}{x^{n}}\right )}{n}, \frac {2 \, {\left (x \sqrt {\frac {b x^{n} - a}{x^{2}}} - \sqrt {a} \arctan \left (\frac {x \sqrt {\frac {b x^{n} - a}{x^{2}}}}{\sqrt {a}}\right )\right )}}{n}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {\frac {- a + b x^{n}}{x^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {-\frac {a-b\,x^n}{x^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________